﻿using System;
using System.Collections.Generic;

using Xamarin.Forms;

namespace letter
{
    public partial class MyPage : ContentPage
    {
        public MyPage()
        {
            InitializeComponent();
            url.Text= "https://www.google.com";
            Browser.Source = url.Text;
        }

        void Back_Clicked(object sender, System.EventArgs e)
        {
            if (Browser.CanGoBack)
                Browser.GoBack();
        }

        void Forward_Clicked(object sender, System.EventArgs e)
        {
            if (Browser.CanGoForward)
                Browser.GoForward();
        }

        void Go_Clicked(object sender, System.EventArgs e)
        {
            Browser.Source = url.Text;
        }

        void Handle_Navigating(object sender, Xamarin.Forms.WebNavigatingEventArgs e)
        {
            LodingLable.IsVisible = true;
        }

        void Handle_Navigated(object sender, Xamarin.Forms.WebNavigatedEventArgs e)
        {
            LodingLable.IsVisible = false;
        }
    }
}
